Dekker's algorithm